package A1_4.pays;

public class Cash extends Payment{//现金（Cash），具有支付金额（cashTendered）属性
    private double cashTendered;

    @Override
    public String toString() {
        return "现金{" +
                "具有金额" + super.getAmount() +
                ", 支付金额=" + cashTendered +
                '}';
    }

    public Cash() {
    }

    public Cash(double cashTendered) {
        this.cashTendered = cashTendered;
    }

    public Cash(double amount, double cashTendered) {
        super(amount);
        this.cashTendered = cashTendered;
    }

    public double getCashTendered() {
        return cashTendered;
    }

    public void setCashTendered(double cashTendered) {
        this.cashTendered = cashTendered;
    }
}
